package gui;

import javax.swing.UIManager;

import service.Service;
import service.StackMonitor;

/**
 * 
 * @author Alexey Kuprin
 * 
 */
public class App {
	private static StackMonitor stackMonitor;

	public static void main(String[] args) {
		try {
			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
			Service.getInstance().checkAndCreateLocations();

			MainFrame frame = new MainFrame();
			frame.setVisible(true);

			stackMonitor = new StackMonitor(new StackAlert(frame));
			stackMonitor.execute();
		} catch (Exception e) {
			ExceptionHandler.handleException(e,
					"Application has failed to start.");
		}
	}
}
